package com.itheima.contact.test;

import com.itheima.contact.dao.UserMapper;
import com.itheima.contact.domain.User;
import com.itheima.contact.utils.SessionFactoryUtils;
import org.apache.ibatis.session.SqlSession;

import java.util.List;

/**
 * @Author Azer
 * @LOVE,,,
 * @Date 2021/9/19 9:20
 */
public class testMybatis {
    public static void main(String[] args) {
        SqlSession session = SessionFactoryUtils.getSession();
        UserMapper mapper = session.getMapper(UserMapper.class);
        List<User> users = mapper.queryAllUsers();

        users.forEach(System.out::println);
    }
}
